<?php

require_once 'config.php';

require_once 'system/startup.php';

$engine_loader = new ConfigLoader();
Singleton::register('engine/loader', $engine_loader);

$engine_data = new Data();
Singleton::register('engine/data', $engine_data);

$request = new Request();
Singleton::register('request', $request);

$response = new Response();
Singleton::register('response', $response);

if($request->hasParam('action')){
	$action = $request->getParam('action');
	$engine_action = new Action($action);
}else {
	$engine_action = new Action('account/form');
}
Singleton::register('engine/action', $engine_action);

$document = new Document();
$document->front();